<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="../js/jquery-3.5.1.min.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<input type="text" class="p1" value="88" />  <input type="button" class="p2" value="是否为两位数"/>
		<input type="text" class="p3" value="" />
		<script type="text/javascript">
			$(function(){
				$(".p2").click(function(){
					var a = $(".p1").val();
					// var c = match(/[1-9]+\d*/);
					if(a > 9 &&  a < 100 && (/^(\+|-)?\d+$/.test(a))){
						$(".p3").val("是");
					}else{
						$(".p3").val("否");
					}
				})
			})
		</script>
	</body>
</html>
